package com.googlecode.jmicroerp.service;

import com.googlecode.jmicroerp.repository.RecipientRepository;
//import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author Alexandru.Codescu
 */
@Service(value = "recipientService")
public class RecipientService {
    @Autowired
    private RecipientRepository recipientRepository;
    
    public Object[] listDenumiri(String denumire, Long idMagazin) {
        List<Object[]> objs = recipientRepository.listDenumiri(denumire, idMagazin);
        if (objs.isEmpty()) {
                return null;
            } else {
                return objs.get(0);
            }
    }
    
//    public List<Object[]> listDenumiri(String denumire) {
//        return produseRepository.listDenumiri(denumire);
//        
//    }

}